<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>queryselector</title>
    <script src="../jquery-1.7.2.js"></script>
</head>
<body>
<div id="test">asd</div>
<h5>使用document.querySelector来缓存dom包括其属性等</h5>
<script>
    $(function(){
        var a = document.querySelector('#test');
        console.log(a);
    })
</script>
</body>
</html>